UserManagement

interface UserManagement

The UserManagement interface provides methods for retrieving an authenticated user and deleting authentication factors from an authenticated user.

Types

Link copied to clipboard
data class UpdateParams(val name: NameData? = null, val untrustedMetadata: Map<String, Any>? = null)

Data class used for wrapping parameters used with User updates

Functions

Link copied to clipboard
abstract suspend fun deleteFactor(factor: UserAuthenticationFactor): DeleteFactorResponse
abstract fun deleteFactor(factor: UserAuthenticationFactor, callback: (DeleteFactorResponse) -> Unit)

Deletes a UserAuthenticationFactor from the currently authenticated user

Link copied to clipboard
abstract fun getSyncUser(): UserData?

Get user from memory without making a network call

Link copied to clipboard
abstract suspend fun getUser(): UserResponse
abstract fun getUser(callback: (UserResponse) -> Unit)

Fetches a user from the current session

Link copied to clipboard
abstract suspend fun update(params: UserManagement.UpdateParams): UpdateUserResponse
abstract fun update(params: UserManagement.UpdateParams, callback: (UpdateUserResponse) -> Unit)

Updates the currently authenticated user